db = db.getSiblingDB('tcp-gaode');

// 创建必要的集合
db.createCollection('locations');
db.createCollection('tracks');

// 创建索引
db.locations.createIndex({ timestamp: 1 });
db.locations.createIndex({ latitude: 1, longitude: 1 });
db.tracks.createIndex({ startTime: 1, endTime: 1 }); 